﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Register.aspx.cs" MasterPageFile="~/Master/UCenter.master"
    Inherits="CSP.Web.UCenter.Register" %>

<asp:Content ID="CSPHead" runat="server" ContentPlaceHolderID="CSPHead">
    <title>产品经理注册</title>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta name="description" content="" />
    <meta name="author" content="" />
</asp:Content>
<asp:Content ID="CSPStyleAndScript" runat="server" ContentPlaceHolderID="CSPStyleAndScript">
    <!-- page -->
    <link href="/Styles/theme/base/main/login.css" rel="stylesheet">
    <script type="text/javascript" src="/Scripts/Validate/validate.js"></script>
    <script type="text/javascript">

        $().ready(function () {
            $("#MyHome").validate();
        });

        function RefreshImageValidation() {
            var createImageKey = $.getGUIDForDateTime();
            $("#<%=Txt_CreateImageKey.ClientID %>").val(createImageKey);
            var url = "/Common/ImageValidation.aspx?createimagekey=" + createImageKey;
            $("#ImgValidation").attr("src", url);
            $("#ImgValidationError").hide();
        }

        function CheckImage() {
            
            var createImageKey = $("#<%=Txt_CreateImageKey.ClientID %>").val();
            var result;
            var imgCode = $("#<%=Txt_ValidationCode.ClientID %>").val();
            $.ajax({
                url: "/Common/ImageValidation.aspx?checkimagekey=" + createImageKey + "&imgcode=" + imgCode,
                type: "get",
                dataType: "json",
                cache: false,
                async: false,
                success: function (data, msg, jqXHR) {
                    if (data.status == 1) {
                        result = true;
                        $("#ImgValidationError").hide();
                    } else {
                        result = false;
                        RefreshImageValidation();
                        $("#ImgValidationError").show();
                    }
                }
            });

            return result;
        }
    </script>
</asp:Content>
<asp:Content ID="CSPMain" runat="server" ContentPlaceHolderID="CSPMain">
    <div id="content">
        <div class="login-cont clearfix register">
            <div class="login-box">
                <div class="login-form">
                    <ul class="log-hd">
                        <li class="reg">
                            <h2>
                                快速注册</h2>
                        </li>
                    </ul>
                    <div class="log-bd">
                        <div class="filed dib-g">
                            <label class="label dib-u" for="user-account">
                                <span style="color: Red">*</span>手机号码：</label>
                            <span class="text-wrap dib-u">
                                <input class="text {required: true,remote:'/UCenter/Register.aspx?checkname=1',messages:{remote:'抱歉,该号码已经注册'}}"
                                    id="Txt_UserName" type="text" runat="server">
                            </span><span class="reg-tip dib-u"><span style="display: none;">请输入11位手机号码</span>
                                <label class="success">
                                </label>
                            </span>
                        </div>
                        <div class="filed dib-g">
                            <label class="label dib-u" for="user-password">
                                <span style="color: Red">*</span>登录密码：</label>
                            <span class="text-wrap dib-u">
                                <input class="text {required: true,minlength:6,maxlength:16,norm:true,messages:{norm:'密码中不允许使用特殊字符'}}" id="Txt_FirstPassWord"
                                    runat="server" type="password">
                            </span><span class="reg-tip dib-u">6-16个字符，请使用字母加数字或符号的组合密码，不能单独使用字母、数字或符号。
                                <!-- <label class="error">密码错误</label> -->
                            </span>
                        </div>
                        <div class="filed dib-g">
                            <label class="label dib-u" for="user-repassword">
                                <span style="color: Red">*</span>确认密码：</label>
                            <span class="text-wrap dib-u">
                                <input class="text {required: true,minlength:6,maxlength:16,equalTo:'#CSPMain_Txt_FirstPassWord'}"
                                    id="Txt_ConfirmPassWord" runat="server" type="password">
                            </span><span class="reg-tip dib-u">再输入一次密码 </span>
                        </div>
                        <div class="filed dib-g">
                            <label class="label dib-u" for="user-yzm">
                                <span style="color: Red">*</span>验证码：&nbsp;&nbsp;</label>
                            <span class="text-wrap dib-u">
                                <input class="text yzm" id="Txt_ValidationCode" runat="server" type="text"></span><input class="submit ui-btn-confirm" id="SubmitCode" runat="server" onclick="return CheckImage();"  type="button" value="获取验证码" />
                                <span class="reg-tip dib-u">输入手机验证码</span>
                        </div>
                        <div style="display: none">
                            <input id="Txt_CreateImageKey" value="" runat="server" /></div>
                        <div class="filed dib-g">
                            <label class="label dib-u">
                            </label>
                            <span class="text-wrap btn-mod dib-u">
                                <input class="submit ui-btn-confirm" id="BtnSubmit" runat="server" onclick="return CheckImage();"
                                    onserverclick="BtnSubmit_Click" type="submit" value="同意协议并注册">
                                <a href=''>查看协议</a> </span><span class="reg-tip dib-u"></span>
                        </div>
                    </div>
                    <!-- log-bd -->
                    <div class="log-ft">
                        <h4>
                            您也可以用以下方式登录：</h4>
                        <div class="ot-login dib-g">
                          <a class="login-qq dib-u" href="/user/signqq" style="display:none">QQ</a> <a class="login-weibo dib-u"
                                href="/UCenter/OtherLogin.aspx?OtherType=3&urlback=<%=URLBack %>">新浪微博</a> <a class="login-tqq dib-u" style="display:none" href="/tencent/login">腾讯微博</a>
                            <a class="login-douban dib-u" href="/user/signdouban" style="display:none">豆瓣</a> <a class="login-taobao dib-u"
                                href="/user/signtaobao" style="display:none">淘宝网</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</asp:Content>
